package com.android.application;

import java.io.File;
import java.io.RandomAccessFile;

import android.os.Environment;

public final class BinaryIOUtil {
	
	public static void SaveFile(byte[] binary) {
	    
		if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
			File file = new File(Environment.getExternalStorageDirectory(), "txllog.txt");
			try {
				RandomAccessFile raFile = new RandomAccessFile(file, "w");
				raFile.seek(raFile.length());
				raFile.write(binary);
				raFile.close();
			} catch(Exception e) {
				
			}
		} 
	}
	
	/*
	public static byte[] ReadFile(String path) {
		
	}
	*/
	
}
